package com.lz.repository.impl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lz.entity.UserTest;
import com.lz.repository.TestUserRepository;


public class TestUserRepositoryImpl implements TestUserRepository{


	private SessionFactory sessionFactory;
	
	private Session getSession() {
		
		
		return sessionFactory.openSession();
	}

	@Override
	public void add(UserTest user) {
		getSession().save(user);
		getSession().close();
	}

	
	
	
}
